import http from "../utils/http";

export const reservation = (data) => http.post("order/reservation", data);
export const cancelOrder = (id) => http.post(`order/cancelOrder/${id}`);
export const payOrder = (id) => http.post(`order/payOrder/${id}`);

export const getMyOrder = (userId) => http.get(`order/getMyOrder/${userId}`);
export const getExtInfoList = () => http.get(`order/getExtInfoList`);
export const getCarTypeList = () => http.get(`order/getCarTypeList`);
export const getOrderList = (params) =>
  http.get(`order/getOrderList`, { params });

export const getCarList = () => http.get(`order/getCarList`);
export const receiveOrder = (orderId,carId) => http.post(`order/receiveOrder/${orderId}/${carId}`);
export const completeOrder = (orderId,realPrice) => http.post(`order/completeOrder/${orderId}/${realPrice}`);